package edu.jmu.service.message.impl;

import java.util.Date;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import edu.jmu.bean.QueryResult;
import edu.jmu.bean.message.Message;
import edu.jmu.service.base.DaoSupport;
import edu.jmu.service.message.MessageService;

@Service
public class MessageServiceBean extends DaoSupport<Message> implements MessageService {
	@Override
	@Transactional(readOnly=true,propagation=Propagation.NOT_SUPPORTED)
	public QueryResult<Message> GetMessageByTime(Date beginTime, Date endTime) {
		String wherejpql = " o.recordTime between ?1 and ?2";
		return super.getScrollData(0, 200, wherejpql, new Date[]{beginTime,endTime});
	}
}
